home *** CD-ROM | disk | FTP | other *** search
/ Greatest Childrens Stories Ever Told / Greatest_Stories.iso / demos / funtown / demo.dir / 00048_Script_Scripts 3 < prev    next >
Text File  |  1994-11-08  |  5KB  |  151 lines

  1. --òòò Scripts 3
  2. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  3. on smallViewReposition 
  4.   set userLoc=the clickLoc
  5.   global CU
  6.   if CU then exit
  7.   set oneThirdH=the width of sprite 34/3
  8.   set oneThirdV=the height of sprite 34/3
  9.   set navigationRect=the rect of sprite 34
  10.   set oneThirdRect=navigationRect - rect ( 0,0,oneThirdH*2,oneThirdV*2 )
  11.   if inside ( userLoc, oneThirdRect ) then reposition "1"
  12.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH, 0 )) then reposition "2" 
  13.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH*2, 0 )) then reposition "3" 
  14.   else if inside ( userLoc, offset ( oneThirdRect, 0, oneThirdV )) then reposition "8" 
  15.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH, oneThirdV )) then reposition "c"
  16.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH*2, oneThirdV )) then reposition "4" 
  17.   else if inside ( userLoc, offset ( oneThirdRect, 0, oneThirdV*2 )) then reposition "7" 
  18.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH, oneThirdV*2 )) then reposition "6"
  19.   else if inside ( userLoc, offset ( oneThirdRect, oneThirdH*2, oneThirdV*2 )) then reposition "5" 
  20. end
  21. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  22. on reposition nextView
  23.   global mode, MS, CV, H, V, CIU, MIU
  24.   global backDropParameters, QL, dontPassIt, CU
  25.   if CU then exit
  26.   if CIU then restoreChalk
  27.   if MIU then disengageMap
  28.   if CV="0" or string (nextView)="0" then set dontPassIt=1
  29.   else set dontPassIt=0
  30.   set CV=string (nextView)
  31.   if the locH of sprite 47<>190 then
  32.     if the locV of sprite 47<>310 then
  33.       deactivate string ( 47 )
  34.     end if
  35.   end if
  36.   puppetTransition 0
  37.   if mode=2  then
  38.     go frame ("pos"& CV) 
  39.   else
  40.     deactivate "2"
  41.     go frame ("pos"& CV& "1") 
  42.     showPatch the left of sprite 1, the top of sprite 1
  43.   end if
  44.   updateStage
  45. end
  46. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  47. on initializeMap
  48.   global CV, CIU, MIU, NM, M, PMS, CU, TF, mode
  49.   if CU then exit
  50.   put the frame into TF
  51.   if mode > 2 then deactivate "48"
  52.   set the trails of sprite 47=false
  53.   if CIU then restoreChalk
  54.   if MIU then disengageMap
  55.   repeat with x=1 to 24
  56.     put the puppet of sprite x into item x of PMS
  57.     if the frame <> label ( "pos01" ) then puppetSprite x, true
  58.     else puppetSprite x, false
  59.   end repeat
  60.   repeat with x=25 to 33
  61.     puppetSprite x, false
  62.   end repeat
  63.   puppetSprite 47, false
  64.   puppetSprite 39, true
  65.   puppetTransition 50,0,8 
  66.   go marker ("pos"& CV) +2
  67.   set MIU=1
  68.   go frame "map"
  69. end
  70. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  71. on engageMap
  72.   global CV, CIU, MIU, NM, M, CU
  73.   if CU then exit
  74.   puppetSprite ( 47 ), true
  75.   repeat with x=26 to 33 
  76.     StartTimer
  77.     if rollOver ( x ) then
  78.       if the type of sprite x=1 then
  79.         repeat while RollOver(x) = True
  80.           if the timer >= 7 then 
  81.             set NM=( item 1 of the name of cast ( the castNum of sprite x ))
  82.             set M=( item 2 of the name of cast ( the castNum of sprite x )) 
  83.              --Sound PlayFile 1,  "Around the Town:Sounds:"&(item 2 of the name of Cast (the CastNum of Sprite x))
  84.             --Sound PlayFile 1, ( item 2 of the name of cast ( the castNum of sprite x ))
  85.             puppetSound  ( item 2 of the name of cast ( the castNum of sprite x ))
  86.             exit repeat
  87.           end if
  88.         end repeat
  89.         set the castNum of sprite ( 47 )=the number of cast ( "map"& NM )
  90.         updateStage
  91.         repeat while RollOver(x) = True
  92.           if the MouseDown then
  93.             put (item 2 of the name of Cast (the CastNum of Sprite x)) into Mikey
  94.             delete char 1 of Mikey
  95.             selectFromMap Mikey
  96.             exit
  97.           end if
  98.         end repeat
  99.         exit repeat
  100.       end if
  101.     end if
  102.   end repeat
  103.   go the frame
  104. end
  105. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  106. on disengageMap
  107.   global mode, CV, CIU, MIU, NM, M, PMS, CU, TF, MS
  108.   if CU then exit
  109.   if CIU then restoreChalk 
  110.   puppetSprite ( 47 ), false
  111.   puppetTransition 0
  112.   if mode > 2  then activate 48, the number of Cast "Skip",1,8,192,363,"","",""
  113.   go marker ( "map" ) +3
  114.   go marker ( "map" ) +2
  115.   go marker ( "map" ) +1
  116.   go marker ( "map" )
  117.   repeat with x=1 to 24
  118.     puppetSprite x, value ( item x of PMS )
  119.   end repeat
  120.   puppetSprite 39, false 
  121.   set MIU=0
  122.   if mode = 2 then
  123.     go frame ("pos"& CV) 
  124.   else
  125.     deactivate "2"
  126.     go frame ("pos"& CV& "1")  
  127.     ShowPatch the left of sprite 1, the top of sprite 1
  128.   end if
  129.   updateStage
  130.   set M=the movie
  131. end
  132. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  133. on selectFromMap Mikey
  134.   global  FTM, CU,myFrame
  135.   if CU then exit
  136.   set FTM = true
  137.   doWindow3
  138.   --alert "The map feature has been disabled"&Return&"on this demo."
  139.   --engageMap
  140. end
  141. --ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù
  142. on HalfCorrectFace
  143.   global mode
  144.   if mode = 2 then exit
  145.   activate 44, the number of Cast "Skip",1,8,192,363,"","",""
  146.   updateStage
  147. end
  148.  
  149.  
  150.  
  151.